package com.beichuan_travel.model.abstracts;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Restaurant {

    /*
     * 餐馆名字
     * */
    @ApiModelProperty(name = "name", value = "餐馆名字")
    @NotBlank(message = "餐馆名字不能为空")
    @Length(max = 20, message = "餐馆名字不能超过二十个字符")
    private String name;

    /*
     * 餐馆地址
     * */
    @ApiModelProperty(name = "location", value = "餐馆地址")
    @NotBlank(message = "餐馆地址不能为空")
    @Length(max = 255, message = "餐馆地址不能超过255字")
    private String location;

    @ApiModelProperty(name = "price", value = "餐馆人均消费")
    @NotNull(message = "人均消费不能为空")
    private Float price = 0F;

    /*
     * 餐馆描述
     * */
    @ApiModelProperty(name = "description", value = "餐馆描述", allowEmptyValue = true)
    @Length(max = 255)
    private String description;

}
